import request from '@/utils/request'


/** 学期列表 */
  export function GetYearList(query) {
    return request({
      url: '/committee/year/list',
      method: 'get',
      params: query
    })
  }
// 查询纳新申请列表
export function listRecruit(query) {
  return request({
    url: '/hd/recruit/list',
    method: 'get',
    params: query
  })
}

// 查询纳新申请详细
export function getRecruit(id) {
  return request({
    url: '/hd/recruit/' + id,
    method: 'get'
  })
}

// 新增纳新申请
export function addRecruit(data) {
  return request({
    url: '/hd/recruit',
    method: 'post',
    data: data
  })
}

// 修改纳新申请
export function updateRecruit(data) {
  return request({
    url: '/hd/recruit',
    method: 'put',
    data: data
  })
}

// 停止纳新申请
export function stopRecruit(id) {
  return request({
    url: '/hd/recruit/stopRecruit/' + id,
    method: 'put',
    // data: {id:id}
  })
}
// 删除纳新申请
export function delRecruit(id) {
  return request({
    url: '/hd/recruit/' + id,
    method: 'delete'
  })
}

// 纳新申请
export function RecruitApply(data) {
  return request({
    url: '/hd/recruit/apply',
    method: 'post',
    data: data
  })
}

// 详情修改
export function RecruitDetailsEdit(data) {
  return request({
    url: '/hd/recruit/detailsEdit',
    method: 'put',
    data: data
  })
}


// 状态修改
export function RecruitStateEdit(id,flag) {
  return request({
    url: '/hd/recruit/stateEdit/'+id+'/'+flag,
    method: 'put',
  })
}

// 显示二维码
export function showQrCode(orgId) {
  return request({
    url: '/hd/recruit/showQrCode?orgId='+orgId,
    method: 'get',
  })
}


// 纳新学生报名
export function stuApply(data) {
  return request({
    url: '/hd/apply/stuApply',
    method: 'post',
    data: data
  })
}


// 批量修改审核状态
export function updateStatusBatch(ids,checks,remarks) {
  return request({
    url: '/hd/recruit/updateStatusBatch/'+ ids +"/"+ checks +"/"+ remarks,
    method: 'put'
  })
}
// 修改审核状态
export function updateStatus(id,checks,remarks) {
  return request({
    url: '/hd/recruit/updateStatus/'+ id +"/"+ checks +"/"+ remarks,
    method: 'put'
  })
}

// 查询昵称
export function FindNickName(id) {
  return request({
    url: '/user/findNickName/' + id,
    method: 'get'
  })
}

// 查询组织信息
export function FindOrgInfoByDetail(data) {
  return request({
    url: '/hd/org/FindOrgInfoByDetail',
    method: 'post',
    data
  })
}

// // 根据studentId查询所在组织信息
// export function FindOrgInfoByStudentId(studentId) {
//   return request({
//     url: '/hd/org/FindOrgInfoByStudentId/' + studentId,
//     method: 'get'
//   })
// }
// 根据studentId查询所在组织信息
export function FindOrgInfoByStudentId(query) {
  return request({
    url: '/committee/org/orgNameList/',
    method: 'get',
    params: query
  })
}
// 根据studentId查询指导单位信息
export function FindSponsorInfoByStudentId(studentId) {
  return request({
    url: '/committee/sponsor/list',
    method: 'get'
  })
}
// 教师下拉框
export function canChooseTeacherList(parm) {
  return request({
    url: '/eqxm/teamTeacher/canChooseTeacherList/' + parm,
    method: 'get'
  })
}

//下载图片
export function downloadImgs(params) {
  return request({
    url: '/common/download/url',//后端自定义的下载接口/common/download/url，路径为admin模块的com.ruoyi.web.controller.common;
    responseType: 'blob', //设置后端返回类型为二进制流，不设置会返回乱码
    method: 'get',
    params
  })
}




